//
//  RootSearchData.m
//  __PRODUCTNAME__
//
//  Created by Gollum on 16/09/21
//  Copyright (c) Gollum. All rights reserved.
//

#import "RootSearchData.h"
#import "RootSearchNewssummaryinfolist.h"

@implementation RootSearchData

+ (NSDictionary *)objectClassInArray{
    return @{@"newsSummaryInfoList" : [RootSearchNewssummaryinfolist class]};
}
- (void)setValue:(id)value forKey:(NSString *)key{
    //记得super
    [super setValue:value forKey:key];
    
    NSMutableArray <RootSearchNewssummaryinfolist *>*searchNews = [NSMutableArray array];
    
    NSArray *valueArray = value;
    if ([key isEqualToString:@"newsSummaryInfoList"]) {
        for (NSDictionary *dic in valueArray) {
            RootSearchNewssummaryinfolist *myData = [RootSearchNewssummaryinfolist modelWithDic:dic];
            [searchNews addObject:myData];
        }
        _newsSummaryInfoList = searchNews;
    }
    
    
}

@end
